home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 007 / qbsub10.arc / NUMDMO.ASC < prev    next >
Text File  |  1986-06-25  |  2KB  |  53 lines

  1. ' NUMDMO.ASC -- MSDOS QuickBASIC Numlock subroutine test    25 June 86
  2. '        by David L. Poskie     (608) 274-9560
  3. '                  7118 Raymond Rd. Madison, WI 53719
  4. ' Please run any suggestions, corrections, additions, or changes by me.
  5. ' I can be messaged on all the major Madison, WI RBBS's.
  6.  
  7. GOTO Start
  8.     Rem    $Include: 'KEY.SUB'
  9.     Rem    $Include: 'OMNI.SUB'
  10.     
  11. Start:
  12.     ' Print centered Text$, with top of frame at line 2.
  13.     X = 6                     'Set the starting line
  14.     FG = 11                    'Set the color of Text$
  15.     BG = 3                    'Set the background color
  16.     MG = 0                    'Set the color of sign frame
  17.     KeyCode = 8                'Set ASCII code of sign frame
  18.     Text$ = "Numlock subroutines demonstration" 
  19.     GOSUB SignCenter
  20.     LOCATE 10 , 22
  21.     Text$ = "Please DON'T press the Numlock key !"
  22.     GOSUB Center
  23.     GOSUB GetKeyPress
  24.     CLS
  25.     GOSUB TestNumlock
  26.     LOCATE 12,30
  27.     Text$ = "Numlock is now "
  28.     GOSUB CenterStay
  29.     IF IsNumlock                            _
  30.        THEN PRINT "ON"                        _
  31.        ELSE PRINT "OFF"
  32.     GOSUB GetKeyPress
  33.     CLS
  34.     LOCATE 12 , 20
  35.     LINE INPUT "Please enter some of the numeric keypad keys "; Temp$
  36.     IF Numlock                            _
  37.        THEN GOSUB NumlockOff                    _
  38.        ELSE GOSUB NumlockOn
  39.     LOCATE 14,25
  40.     LINE INPUT "Now enter some more numeric keypad keys "; Temp$
  41.     Text$ = "This program has toggled your Numlock key"
  42.     GOSUB Center
  43.      IF Numlock                            _
  44.        THEN GOSUB NumlockOn                        _
  45.        ELSE GOSUB NumlockOff
  46.     PRINT
  47.     Text$ = "Numlock has been restored to its original setting"
  48.     GOSUB Center
  49.     Text$ = "End of demonstration "
  50.     GOSUB Center
  51. SYSTEM
  52. '>>>>> Physical EOF for NUMDMO.ASC  25 June 86
  53.